import { getAddress, getActive, setActive } from '@/config/storage.js'
import { getWalletAddress, getSign } from '@/dapp/web3.js'
import BigNumber from "bignumber.js";
import DApp from '@/dapp/index.js'
import utils from '@/utils/index.js'
export default {
	namespaced: true,
	state: {
		address: getAddress()||'',// 地址
		isActive: getActive()||1,// 是否激活
		mineData: {},
		ref:null,
		chainName:'--'
	},
	mutations: {
		setAddress(state, payload) {
			state.address = payload;
		},
		setRef(state, payload){
			state.ref = payload
		},
		setMineData(state, payload){
			state.mineData = payload
			state.isActive = payload.is_activate
			setActive(payload.is_activate)
		},
		setChainName(state, payload){
			state.chainName = payload
		}
	},
	actions: {
		
	}
};